home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1996 November / macformat-043.iso / mac / Shareware Plus / Developers / OpenStack Rinaldi Collection / openstack-rinaldi-lib / ResText 2.3 (US) / ResText 2.3 (US).rsrc / HELP_5635 next >
Encoding:
Text File  |  1996-01-09  |  4.5 KB  |  95 lines

  1.  
  2.  
  3.                                               ResText 2.3
  4.  
  5.                                           by Frédéric RINALDI
  6.  
  7. DESCRIPTION
  8.   ResText XFCN allows to get text from any resource.
  9.  
  10. SYNTAX
  11.                  ResText(<res type>,<res ID or name>[,<#X>][,<fileName>]
  12.                               [,"hex"][,<stripCtrl>][,"DontResolveAlias"])
  13.  
  14. PARAMETERS
  15.    <res type> is a four chars string, giving the resource type.
  16.  
  17.    <res ID or name> can be the ID or the name of the resource.
  18.  
  19.    <#X> allows to give the item number of a STR# resource (ex : "#1"). Default returns all items, this param is ignored for other resource types.
  20.  
  21.    <fileName> is optional, and the full pathname of the file to get the resource from. It can be a single name or whole pathname. If just a single name is supplied, the file is assumed to be in the same folder than the current stack. If not provided, the current stack is used.
  22.    If "all" is passed here, all resource file hierarchy will be explored starting from current stack until System file.
  23.  
  24.    "hex" allows to get the resut as hexadecimal string rather that ASCII.
  25.  
  26.    <stripCtrl> is a boolean allowing to filter control chars from the got text, and replace them with "[<ASCII value>]". Default is TRUE, this param is ignored with "hex" output.
  27.  
  28.    "dontResolveAlias" allows to deal with an alias file itself (System 7.0 only) rather than with the file pointed by it.
  29.  
  30.    Using "!", "?" or "=" as first parameter will return an online help (resp. copyright, syntax and output).
  31.  
  32. USING
  33.   The XFCN returns the text read from the resource. Two special cases must be considered :
  34.  
  35.    STR : result will contain two lines being respectively the text and the  datas found in the resource. Each of them can be empty.
  36.  
  37.    STR# : result will contain one line per entry found in the resource.
  38.  
  39.    With an ASCII output string, any control chars will be replaced by "[<ASCII value>]". Don't forget to replace them if needed, using RestoreSpecialChars XFCN.
  40.  
  41. ERRORS
  42.    If an error occurs, ResText can return :
  43.      "Error : Not a file"
  44.      "Error : Alias file not supported"
  45.      "Error : Volume not found"
  46.      "Error : Bad Name"
  47.      "Error : File not found"
  48.      "Error : Folder not found"
  49.      "Error : File is busy"
  50.      "Error : I/O Error"
  51.      "Error : No resource fork"
  52.      "Error : AppleShare insufficient privileges"
  53.      "Error : Missing or empty parameter(s)"
  54.      "Error : Bad resource type"
  55.      "Error : Resource not found"
  56.      "Error : Out of memory"
  57.      "Error : Incorrect STR# item number"
  58.      "Error : Index is out of range"
  59.  
  60. HISTORY
  61. 2.3 :                                                                                      02/07/94
  62. • Fixed memory bug
  63. • Replacement of control chars by <ASCII value> 15 times faster!
  64.  
  65. 2.1 :                                                                                      06/15/93
  66. • Added "all" as filename param
  67.  
  68. 2.0                                                                                         02/23/93
  69. • complete re-write of code
  70. • Added "hex" option
  71. • Added STR# item param
  72. • Special chars replaced in a usual way
  73.                                                                                          
  74. 1.4                                                                                         03/06/92
  75. • Special handling of STR & STR# resources
  76. • All control chars replaced by "[<ASCII value>]"
  77.                                                                                          
  78. 1.3                                                                                         02/23/92
  79. • Resource file handling enhanced
  80.                                                                                          
  81. 1.2                                                                                         12/25/91
  82. • Fixed alias file bug under System 7.0.1
  83.                                                                                          
  84. 1.1
  85. • General enhancement of the code
  86. • Added "=" param for online help
  87. --------------------------------------------------------------------
  88.    All externals included in this stack are FreeWare and may be used in non-commercial software provided the following notice is visibly present :
  89.  
  90.                    ResText XFCN, © Frederic Rinaldi, 1989…1993.
  91.  
  92.    Free for non-commercial use. Use in commercial software subjected to prior acknowledgement and licensing from the author, reachable at the following network addresses:
  93.  
  94. AppleLink: RINALDI1   CalvaCom : FR10    Compuserve : 71170,2111
  95.                Internet : RINALDI1@APPLELINK.APPLE.COM